import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter);

const routes = [
  { path: '/', redirect: '/overview' },
  {
    path: '/index', component: () => import("../views/index/index.vue"),
    children: [
      { path: '/overview', component: () => import("../views/overview/index.vue") }, //总览
      { path: '/channel', component: () => import("../views/channel/index.vue") }, //渠道
      { path: '/market', component: () => import("../views/market/index.vue") }, //销售
      { path: '/machining', component: () => import("../views/machining/index.vue") }, //加工
      { path: '/origin', component: () => import("../views/origin/index.vue") }, //销售
      { path: '/variety', component: () => import("../views/variety/index.vue") }, //销售
    ]
  }
]

const router = new VueRouter({
  mode: 'hash',
  routes // （缩写）相当于 routes: routes
})

export default router
